﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	x:Class="SilverlightCalculator.DigitControl"
	d:DesignWidth="47" d:DesignHeight="47">
    <UserControl.Resources>
        <Storyboard x:Name="isSelectedTrue_activated">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="bdrDigit"  Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="1.2" KeySpline="0.5,0,0.5,1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="bdrDigit"  Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="1.2" KeySpline="0.5,0,0.5,1"/>
            </DoubleAnimationUsingKeyFrames>
            
        </Storyboard>
        <Storyboard x:Name="isSelectedTrue_deactivated">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="bdrDigit" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="1" KeySpline="0.5,0,0.5,1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="bdrDigit" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="1" KeySpline="0.5,0,0.5,1"/>
            </DoubleAnimationUsingKeyFrames>
            
        </Storyboard>
    </UserControl.Resources>
	<Grid x:Name="LayoutRoot">
		<Border CornerRadius="7,7,7,7" Cursor="Hand" x:Name="bdrDigit" BorderThickness="1,1,1,1" RenderTransformOrigin="0.4,0.4" MouseEnter="bdr7_MouseEnter" MouseLeave="bdr7_MouseLeave">
			<Border.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform/>
				</TransformGroup>
			</Border.RenderTransform>
			<Border.BorderBrush>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FF000000" Offset="0.612"/>
					<GradientStop Color="#FFFFFFFF" Offset="0.379"/>
					<GradientStop Color="#FF000000" Offset="0.143"/>
				</LinearGradientBrush>
			</Border.BorderBrush>
			<Border.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FF78B6FC" Offset="0.705"/>
					<GradientStop Color="#FFF7F7F7" Offset="0"/>
				</LinearGradientBrush>
			</Border.Background>
			<TextBlock HorizontalAlignment="Stretch" x:Name="txtDigit" VerticalAlignment="Center" FontFamily="Arial" FontSize="36" FontWeight="Bold" Text="7" Tag="7" TextAlignment="Center" TextWrapping="NoWrap" Margin="0,0,0,0"/>
		</Border>
	</Grid>
</UserControl>